Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add command to automatically reload your theme #4718

Merged
merged 13 commits into from
Jul 23, 2023

Conversation

Nerixyz
Copy link
Contributor

@Nerixyz Nerixyz commented Jul 7, 2023

Description

Adds an option to watch the custom theme and reload it on changes. The option is only active for the current session (until Chatterino is restarted) to reduce load.

This PR does a few more things. I wasn't sure if I should include this here. I could split the commits up until 8f4770a into a separate PR.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

src/singletons/Theme.cpp Outdated Show resolved Hide resolved
Copy link
Member

@pajlada pajlada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be toggleable as a command rather than a UI thing imo, since it's an extremely small amount of people it's relevant for

Instead of using a FileWatcher, I would prefer the simplicity of a QTimer that runs every X ms (maybe every 500ms?) and reloads the current theme - while less performant, I think it's simpler to reason about

@pajlada pajlada changed the title Add option to automatically reload custom themes Add command to automatically reload your theme Jul 23, 2023
Copy link
Member

@pajlada pajlada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@pajlada pajlada enabled auto-merge (squash) July 23, 2023 11:42
@pajlada pajlada merged commit 9f8a1d8 into Chatterino:master Jul 23, 2023
15 of 16 checks passed
@Nerixyz Nerixyz deleted the feat/theme-watcher branch October 6, 2023 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants